package net.qhzw.vip.qiyu.handler;


import lombok.Getter;
import net.qhzw.vip.qiyu.result.ResultCode;

@Getter
public class MyException extends RuntimeException {

    private int code;
    private String message;

    public MyException(ResultCode resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
    }

    public MyException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public MyException(String message) {
        this.code = 500;
        this.message = message;
    }

}
